﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for BLLRegistration
/// </summary>
public class BLLRegistration
{
    DALCustomer dalCustomer;
    public BLLRegistration()
    {
        dalCustomer = new DALCustomer();
    }

    public void register(tblCustomer customer)
    {
        dalCustomer.insertCustomer(customer);

        
    }
    public void sendEmail(string emailto)
    {
        Email email = new Email();
        string subject = "Welcome to Mail Maintainer!";
        string content = "<p><strong>Dear Customer</strong>,</p><p>	Welcome to Mail Maintainer!</p><p>	You are now officially a member of Mail Maintainer. Your account allows you to hasten your mailing process by displaying your personal particulars automatically whenever you log in.</p><p>	You will no longer need to enter your particulars all over again for every time you required mailing service.</p><p>	To log in when visiting our site just click <strong><u>I am a Member</u></strong> at the front page top, and then enter your User ID and password.</p><p>	When you log in to your account, you will be able to do the following:</p><ul>	<li>		Process new shipment faster when making a mailing request.</li>	<li>		Check the status of mailing.</li>	<li>		Make changes to your account information</li>	<li>		Change your password</li></ul><p>	If you have any questions about your account or any other matter, please feel free to contact us at <u>feedback@mailmaintainer.com</u></p><p>	It will be our pleasure to serve you.</p>";

        email.sendEmail(emailto, "w72461100@hotmail.com", subject, content);
    }

    public bool CheckEmailExist(string email)
    {
        return dalCustomer.isExist(email);
    }
}